Support Paramiko 5 in SSH and SFTP providers#69712
Draft
shivaam wants to merge 1 commit into
Draft
Conversation
Contributor
|
Correct me if I am wrong but from 4->5 this is not a breaking change in terms of Airflow operators right? |
Contributor
Author
Yes, it is not a breaking change anymore. I will update the pr |
shivaam
force-pushed
the
codex/paramiko-5-support
branch
from
July 24, 2026 17:40
8481793 to
cb3ecdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #69669, after SSH and SFTP provider 6.0.0 released Paramiko 4 support.
What
This removes the temporary
paramiko<5.0.0cap from the SSH and SFTP providers so they can resolve Paramiko 5 while continuing to support Paramiko 4.It also keeps RSA private-key validation working with Paramiko 5 by signing the local validation probe with
rsa-sha2-512instead of Paramiko's removed legacyssh-rsaSHA-1 signing path.Compatibility
This is not a new breaking provider API change: the providers still support Paramiko 4, and no Airflow connection option or supported key type is removed by this PR.
Paramiko 5 itself removed RSA SHA-1
ssh-rsasignatures, SHA-1 key exchange algorithms, and GSSAPI. Removing the upper bound allows an environment to resolve Paramiko 5, so users whose servers still require those legacy algorithms can retain Paramiko 4 with an environment constraint such asparamiko<5until the server is upgraded.RSA keys remain supported. During a real connection, Paramiko negotiates a modern RSA signature algorithm such as
rsa-sha2-256orrsa-sha2-512with the server.Validation
uv lock --checkgit diff --checkuv run pytest providers/ssh/tests/unit/ssh/hooks/test_ssh.py -k 'private_key or host_key or dss_host_key or unsupported_host_key' -q(27 passed)uv run pytest providers/ssh/tests/unit/ssh/hooks/test_ssh_async.py providers/sftp/tests/unit/sftp/hooks/test_sftp.py -k 'host_key or private_key or connection' -q(27 passed)uv run --with paramiko==4.0.0 pytest providers/ssh/tests/unit/ssh/hooks/test_ssh.py::TestSSHHook::test_openssh_private_key -quv run ruff format --check providers/ssh/src/airflow/providers/ssh/hooks/ssh.pyuv run ruff check providers/ssh/src/airflow/providers/ssh/hooks/ssh.pyuv run mypy --config-file pyproject.toml providers/ssh/src/airflow/providers/ssh/hooks/ssh.pyprekchecksSSHHookconnection with Paramiko 5 and an RSA private key against the Breeze OpenSSH server, negotiatingrsa-sha2-512and executing a remote command